var list = document.querySelector('#bannerlist');

function init() {
  for (var i = 0; i < 5; i++) {
    var li = document.createElement('li');
    li.className = 'item';
    li.innerText = '我是第' + i + '项';
    list.appendChild(li);
  }

  startScoll();
}

var curIndex = 0;
function startScoll() {
  setInterval(() => {
    console.log(curIndex)
    curIndex++;
    list.style.top = curIndex * -60 + 'px';
  }, 1500);
}

init();
